package com.nolon.flange.view

import android.content.Context
import androidx.appcompat.app.AlertDialog

fun buildAlertDialog(
    context: Context,
    title: String,
    message: String,
    positiveStr: String,
    negativeStr: String,
    positiveAction: () -> Unit
): AlertDialog.Builder {
    return AlertDialog.Builder(context)
        .setTitle(title)
        .setMessage(message)
        .setPositiveButton(positiveStr) { _, _ -> positiveAction() }
        .setNegativeButton(negativeStr, null)
}